<template>
    <div id="index">

    </div>
</template>

<script>
export default {
    created() {
        const { token } = this;
        if (token) {
            this.$router.replace({
                name: "console",
            });
        } else {
            this.$router.replace({
                name: "login",
            });
        }
    },
    computed: {
        token() {
            const tokenName = process.env.VUE_APP_TOKEN_KEY;
            const { localStorage, sessionStorage } = window;
            return !!(localStorage.getItem(tokenName) || sessionStorage.getItem(tokenName) || null);
        },
    },
};
</script>

<style lang="scss" scoped>
</style>